package com.laughing.httpserver.controller;

import com.laughing.httpserver.annotation.HttpController;
import lombok.extern.slf4j.Slf4j;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author laughing.sheng <laughing1917@yeah.net/>
 * @date 2018/1/26
 * @see
 */
@HttpController
@Slf4j
public class DefaultController {

    public Object process(HttpServletRequest request, HttpServletResponse response) {
        response.setContentType("application/json");
        response.setStatus(200);
        return "123";
    }

    public Object notFound(HttpServletRequest request, HttpServletResponse response) {
        response.setStatus(404);
        return "not found";
    }
}
